package com.cskaoyan.controller.vx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.vo.vxVo.CatalogIndexVo;
import com.cskaoyan.bean.vo.vxVo.CatalogVo;
import com.cskaoyan.service.vx.CatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: DYQ
 * @time: Created on 2022/6/7 21:29
 */

@RestController
@RequestMapping("wx/catalog")
public class VxCatalogController {

    @Autowired
    CatalogService catalogService;


    @RequestMapping("current")
    public BaseRespVo current(Integer id) {
        CatalogVo catalogVo = catalogService.queryCurrentCatalog(id);
        return BaseRespVo.ok(catalogVo);
    }

    @RequestMapping("index")
    public BaseRespVo catalogIndex() {
        CatalogIndexVo catalogIndexVo = catalogService.queryCatalogIndex();
        return BaseRespVo.ok(catalogIndexVo);
    }

}
